import React, { useReducer } from 'react';
import { initialState, reducer } from './store';
import Provider from './provider';
import Child from './child';

function App(props) {
  const [state, dispatch] = useReducer(reducer, initialState);
  return (
    <div className="App">
      <Provider store={{ state, dispatch }}>
        <Child />
      </Provider>
    </div>
  );
}

export default App;
